﻿using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Web;
using System.Net;
using System.Xml;

namespace StellarMedical.Web
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class MedicalService
    {

      

        [OperationContract]
        public List<string> getImageFaderPaths()
        {
            string searchPath = HttpContext.Current.Server.MapPath(Config.IMAGE_FADER_PATH);
            

            string[] paths = Directory.GetFiles(searchPath);

            List<string> pathList = new List<string>();

            foreach (string p in paths)
            {
                // skip the broken files

                if (System.IO.Path.GetExtension(p) == ".db")
                    continue;

                pathList.Add(System.IO.Path.GetFileName(p));
            }

            return pathList;
        }




    }
}
